.class public Lcom/htc/android/footprints/activity/PostcardActivity;
.super Landroid/app/Activity;
.source "PostcardActivity.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# static fields
.field public static final EXTRA_ADDRESS:Ljava/lang/String; = "ADDRESS"

.field public static final EXTRA_CATEGORY:Ljava/lang/String; = "CATEGORY"

.field public static final EXTRA_FIX_LOCATION:Ljava/lang/String; = "FIX_LOCATION"

.field public static final EXTRA_FIX_NETWORK:Ljava/lang/String; = "FIX_NETWORK"

.field public static final EXTRA_NOTE:Ljava/lang/String; = "NOTE"

.field public static final EXTRA_PHONE:Ljava/lang/String; = "PHONE"

.field public static final EXTRA_TILE_NAME:Ljava/lang/String; = "TITLE_NAME"

.field public static final EXTRA_WEBSITE:Ljava/lang/String; = "WEBSITE"

.field private static final FIRST_RETRIEVE_ADDRESS_DIALOG:I = 0x2

.field private static final GPS_DISABLED_DIALOG:I = 0x1

.field private static final HANDLE_DESTORY_ACTIVITY:I = 0x39

.field private static final HANDLE_DISMISS_PROGRESS_DIALOG:I = 0x37

.field private static final HANDLE_FIRST_RETRIEVE_ADDRESS:I = 0x38

.field private static final HANDLE_GEOCODER_BY_GPS:I = 0x34

.field private static final HANDLE_GEOCODER_BY_NET:I = 0x35

.field private static final HANDLE_SHOW_DIALG:I = 0x32

.field private static final HANDLE_UPDATE_INDICATOR:I = 0x36

.field private static final HANDLE_UPDATE_TITLE:I = 0x33

.field private static final LOCATION_PICKER_NOT_FOUND_DIALOG:I = 0x4

.field public static final MENU_ADVANCED_EDIT:I = 0x5

.field public static final MENU_DELETE:I = 0x4

.field public static final MENU_FIND_ON_MAP:I = 0x1

.field public static final MENU_REFRESH_GPS:I = 0x2

.field public static final MENU_RE_CAPTURE:I = 0x3

.field public static final MENU_VOICE_RECORD:I = 0x0

.field private static final PROGRESS_DIALOG:I = 0x3

.field private static final REQUEST_RECAPTURE:I = 0x15b3

.field private static final REQUEST_RECORD:I = 0xde

.field private static final RESULT_LOCATION_PICKER:I = 0x1

.field private static final SELECT_LOCATION_DIALOG:I = 0x0

.field private static final SERVICE_BINDED:I = 0x2

.field private static final SERVICE_BINDING:I = 0x1

.field private static final SERVICE_UNBIND:I = 0x0

.field private static final TAG:Ljava/lang/String; = "PostcardActivity"


# instance fields
.field private buttonDone:Landroid/view/View;

.field private buttonPlay:Lcom/htc/android/footprints/view/PlayButton;

.field dlgKeyListener:Landroid/content/DialogInterface$OnKeyListener;

.field private gpsEnabled:Z

.field indicatorFlag:Z

.field private isLanuchByWidget:Z

.field private isPickerRunning:Z

.field private isRecaptureRunning:Z

.field private mBindState:I

.field private mCallback:Lcom/htc/android/footprints/ILocationAgentCallback;

.field private mConnection:Landroid/content/ServiceConnection;

.field private mFixLocation:Landroid/location/Location;

.field private mFixNetwork:Landroid/location/Location;

.field private mFootprint:Lcom/htc/android/footprints/vo/Footprint;

.field private mFootprintAddDate:Landroid/widget/TextView;

.field private mFootprintTitle:Landroid/widget/TextView;

.field private mGpsText:Landroid/widget/TextView;

.field private final mHandler:Landroid/os/Handler;

.field private mIndicator:Landroid/widget/ImageView;

.field private mListDialog:Lcom/htc/widget/HtcAlertDialog;

.field private mMenu:Landroid/view/Menu;

.field private mPostCardPreview:Landroid/widget/ImageView;

.field private mSelectedCategory:Lcom/htc/android/footprints/vo/Category;

.field private mSelectedCateoryStr:Ljava/lang/String;

.field mService:Lcom/htc/android/footprints/ILocationAgentService;

.field private mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

.field private needAnimation:Z

.field private progressDialog:Landroid/app/ProgressDialog;

.field private projection:[Ljava/lang/String;

.field private recordDialog:Lcom/htc/android/footprints/commonui/AudioRecordDialog;

.field private refreshRequired:Z


# direct methods
.method public constructor <init>()V
    .locals 5

    .prologue
    const/4 v4, 0x1

    const/4 v2, 0x0

    const/4 v3, 0x0

    .line 65
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 89
    iput-object v3, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    .line 90
    iput-object v3, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixNetwork:Landroid/location/Location;

    .line 91
    iput-object v3, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mMenu:Landroid/view/Menu;

    .line 93
    iput-boolean v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isPickerRunning:Z

    .line 94
    iput-boolean v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isRecaptureRunning:Z

    .line 96
    iput-boolean v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->refreshRequired:Z

    .line 102
    iput-object v3, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    .line 103
    iput-object v3, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mIndicator:Landroid/widget/ImageView;

    .line 111
    iput-object v3, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mListDialog:Lcom/htc/widget/HtcAlertDialog;

    .line 112
    iput-boolean v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isLanuchByWidget:Z

    .line 120
    iput v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mBindState:I

    .line 887
    const/4 v0, 0x4

    new-array v0, v0, [Ljava/lang/String;

    const-string v1, "_id"

    aput-object v1, v0, v2

    const-string v1, "_display_name"

    aput-object v1, v0, v4

    const/4 v1, 0x2

    const-string v2, "_data"

    aput-object v2, v0, v1

    const/4 v1, 0x3

    const-string v2, "date_added"

    aput-object v2, v0, v1

    iput-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->projection:[Ljava/lang/String;

    .line 1079
    new-instance v0, Lcom/htc/android/footprints/activity/PostcardActivity$7;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/activity/PostcardActivity$7;-><init>(Lcom/htc/android/footprints/activity/PostcardActivity;)V

    iput-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    .line 1260
    new-instance v0, Lcom/htc/android/footprints/activity/PostcardActivity$10;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/activity/PostcardActivity$10;-><init>(Lcom/htc/android/footprints/activity/PostcardActivity;)V

    iput-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->dlgKeyListener:Landroid/content/DialogInterface$OnKeyListener;

    .line 1283
    iput-object v3, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    .line 1284
    new-instance v0, Lcom/htc/android/footprints/activity/PostcardActivity$11;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/activity/PostcardActivity$11;-><init>(Lcom/htc/android/footprints/activity/PostcardActivity;)V

    iput-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mConnection:Landroid/content/ServiceConnection;

    .line 1335
    iput-boolean v4, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->indicatorFlag:Z

    .line 1336
    new-instance v0, Lcom/htc/android/footprints/activity/PostcardActivity$12;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/activity/PostcardActivity$12;-><init>(Lcom/htc/android/footprints/activity/PostcardActivity;)V

    iput-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mCallback:Lcom/htc/android/footprints/ILocationAgentCallback;

    return-void
.end method

.method static synthetic access$002(Lcom/htc/android/footprints/activity/PostcardActivity;Z)Z
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 65
    iput-boolean p1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->needAnimation:Z

    return p1
.end method

.method static synthetic access$100(Lcom/htc/android/footprints/activity/PostcardActivity;)Lcom/htc/android/footprints/view/PlayButton;
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonPlay:Lcom/htc/android/footprints/view/PlayButton;

    return-object v0
.end method

.method static synthetic access$1000(Lcom/htc/android/footprints/activity/PostcardActivity;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 65
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->updateAccuracyToIndicator()V

    return-void
.end method

.method static synthetic access$1100(Lcom/htc/android/footprints/activity/PostcardActivity;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 65
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->setLocationText()V

    return-void
.end method

.method static synthetic access$1200(Lcom/htc/android/footprints/activity/PostcardActivity;)Z
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-boolean v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isLanuchByWidget:Z

    return v0
.end method

.method static synthetic access$1300(Lcom/htc/android/footprints/activity/PostcardActivity;)Lcom/htc/android/footprints/vo/Category;
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mSelectedCategory:Lcom/htc/android/footprints/vo/Category;

    return-object v0
.end method

.method static synthetic access$1400(Lcom/htc/android/footprints/activity/PostcardActivity;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 65
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->doFindOnMap()V

    return-void
.end method

.method static synthetic access$1500(Lcom/htc/android/footprints/activity/PostcardActivity;)Landroid/widget/TextView;
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mGpsText:Landroid/widget/TextView;

    return-object v0
.end method

.method static synthetic access$1600(Lcom/htc/android/footprints/activity/PostcardActivity;)Z
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-boolean v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->refreshRequired:Z

    return v0
.end method

.method static synthetic access$1602(Lcom/htc/android/footprints/activity/PostcardActivity;Z)Z
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 65
    iput-boolean p1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->refreshRequired:Z

    return p1
.end method

.method static synthetic access$1700(Lcom/htc/android/footprints/activity/PostcardActivity;)Lcom/htc/widget/HtcAlertDialog;
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mListDialog:Lcom/htc/widget/HtcAlertDialog;

    return-object v0
.end method

.method static synthetic access$1800(Lcom/htc/android/footprints/activity/PostcardActivity;)Z
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-boolean v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->gpsEnabled:Z

    return v0
.end method

.method static synthetic access$1902(Lcom/htc/android/footprints/activity/PostcardActivity;I)I
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 65
    iput p1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mBindState:I

    return p1
.end method

.method static synthetic access$200(Lcom/htc/android/footprints/activity/PostcardActivity;)Lcom/htc/android/footprints/vo/Footprint;
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    return-object v0
.end method

.method static synthetic access$2000(Lcom/htc/android/footprints/activity/PostcardActivity;)Lcom/htc/android/footprints/ILocationAgentCallback;
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mCallback:Lcom/htc/android/footprints/ILocationAgentCallback;

    return-object v0
.end method

.method static synthetic access$2100(Lcom/htc/android/footprints/activity/PostcardActivity;)Landroid/widget/ImageView;
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mIndicator:Landroid/widget/ImageView;

    return-object v0
.end method

.method static synthetic access$300(Lcom/htc/android/footprints/activity/PostcardActivity;)Landroid/os/Handler;
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    return-object v0
.end method

.method static synthetic access$400(Lcom/htc/android/footprints/activity/PostcardActivity;)Landroid/app/ProgressDialog;
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->progressDialog:Landroid/app/ProgressDialog;

    return-object v0
.end method

.method static synthetic access$500(Lcom/htc/android/footprints/activity/PostcardActivity;)Landroid/widget/TextView;
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprintTitle:Landroid/widget/TextView;

    return-object v0
.end method

.method static synthetic access$600(Lcom/htc/android/footprints/activity/PostcardActivity;)Landroid/location/Location;
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    return-object v0
.end method

.method static synthetic access$602(Lcom/htc/android/footprints/activity/PostcardActivity;Landroid/location/Location;)Landroid/location/Location;
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 65
    iput-object p1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    return-object p1
.end method

.method static synthetic access$700(Lcom/htc/android/footprints/activity/PostcardActivity;Landroid/location/Location;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 65
    invoke-direct {p0, p1}, Lcom/htc/android/footprints/activity/PostcardActivity;->geocoderTitle(Landroid/location/Location;)V

    return-void
.end method

.method static synthetic access$800(Lcom/htc/android/footprints/activity/PostcardActivity;)Landroid/location/Location;
    .locals 1
    .parameter "x0"

    .prologue
    .line 65
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixNetwork:Landroid/location/Location;

    return-object v0
.end method

.method static synthetic access$802(Lcom/htc/android/footprints/activity/PostcardActivity;Landroid/location/Location;)Landroid/location/Location;
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 65
    iput-object p1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixNetwork:Landroid/location/Location;

    return-object p1
.end method

.method static synthetic access$900(Lcom/htc/android/footprints/activity/PostcardActivity;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 65
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->updateToFootprint()V

    return-void
.end method

.method private bindLocationAgentService()V
    .locals 4

    .prologue
    const/4 v3, 0x1

    .line 123
    const-string v1, "PostcardActivity"

    const-string v2, "bind LocationAgentService. mBindState = SERVICE_BINDING"

    invoke-static {v1, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 124
    iput v3, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mBindState:I

    .line 126
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 127
    .local v0, intent:Landroid/content/Intent;
    const-class v1, Lcom/htc/android/footprints/service/LocationAgentService;

    invoke-virtual {v0, p0, v1}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    .line 128
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mConnection:Landroid/content/ServiceConnection;

    invoke-virtual {p0, v0, v1, v3}, Lcom/htc/android/footprints/activity/PostcardActivity;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z

    .line 129
    return-void
.end method

.method private doFindOnMap()V
    .locals 12

    .prologue
    const/4 v8, 0x4

    const/4 v7, 0x1

    const-string v11, "PickerLongitude"

    const-string v10, "PickerLatitude"

    const-string v9, "InputLocation"

    .line 1007
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getWindow()Landroid/view/Window;

    move-result-object v5

    const/16 v6, 0x80

    invoke-virtual {v5, v6}, Landroid/view/Window;->clearFlags(I)V

    .line 1009
    new-instance v4, Landroid/content/Intent;

    const-string v5, "com.htc.android.locationpicker"

    invoke-direct {v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 1010
    .local v4, intent:Landroid/content/Intent;
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v6, 0x7f020097

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    check-cast v3, Landroid/graphics/drawable/BitmapDrawable;

    .line 1012
    .local v3, icon:Landroid/graphics/drawable/BitmapDrawable;
    invoke-virtual {v3}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v0

    .line 1013
    .local v0, bitmap:Landroid/graphics/Bitmap;
    const-string v5, "PickerIcon"

    invoke-virtual {v4, v5, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    .line 1014
    const-string v5, "InputLocation"

    const/4 v5, 0x3

    invoke-virtual {v4, v9, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 1016
    const-string v5, "PickerMode"

    invoke-virtual {v4, v5, v7}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 1017
    const-string v5, "PickerPanelStyle"

    const/16 v6, 0x8

    invoke-virtual {v4, v5, v6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 1019
    const-string v5, "PickerReturnType"

    const/16 v6, 0x9

    invoke-virtual {v4, v5, v6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 1022
    iget-object v5, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    if-nez v5, :cond_1

    .line 1023
    iget-object v5, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixNetwork:Landroid/location/Location;

    if-eqz v5, :cond_0

    .line 1024
    const-string v5, "PickerLatitude"

    iget-object v5, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixNetwork:Landroid/location/Location;

    invoke-virtual {v5}, Landroid/location/Location;->getLatitude()D

    move-result-wide v5

    invoke-virtual {v4, v10, v5, v6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;D)Landroid/content/Intent;

    .line 1025
    const-string v5, "PickerLongitude"

    iget-object v5, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixNetwork:Landroid/location/Location;

    invoke-virtual {v5}, Landroid/location/Location;->getLongitude()D

    move-result-wide v5

    invoke-virtual {v4, v11, v5, v6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;D)Landroid/content/Intent;

    .line 1034
    :goto_0
    const-string v5, "PickerAlertConnectionFailed"

    invoke-static {p0}, Lcom/htc/android/footprints/utils/SettingInfo;->getInstance(Landroid/content/Context;)Lcom/htc/android/footprints/utils/SettingInfo;

    move-result-object v6

    iget-boolean v6, v6, Lcom/htc/android/footprints/utils/SettingInfo;->showConnectionFailedAlert:Z

    invoke-virtual {v4, v5, v6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 1037
    const/4 v5, 0x1

    :try_start_0
    iput-boolean v5, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isPickerRunning:Z

    .line 1038
    const/4 v5, 0x1

    invoke-virtual {p0, v4, v5}, Lcom/htc/android/footprints/activity/PostcardActivity;->startActivityForResult(Landroid/content/Intent;I)V
    :try_end_0
    .catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    .line 1068
    :goto_1
    return-void

    .line 1027
    :cond_0
    const-string v5, "InputLocation"

    invoke-virtual {v4, v9, v8}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    goto :goto_0

    .line 1031
    :cond_1
    const-string v5, "PickerLatitude"

    iget-object v5, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    invoke-virtual {v5}, Landroid/location/Location;->getLatitude()D

    move-result-wide v5

    invoke-virtual {v4, v10, v5, v6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;D)Landroid/content/Intent;

    .line 1032
    const-string v5, "PickerLongitude"

    iget-object v5, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    invoke-virtual {v5}, Landroid/location/Location;->getLongitude()D

    move-result-wide v5

    invoke-virtual {v4, v11, v5, v6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;D)Landroid/content/Intent;

    goto :goto_0

    .line 1039
    :catch_0
    move-exception v5

    move-object v2, v5

    .line 1052
    .local v2, ex:Landroid/content/ActivityNotFoundException;
    iget-object v5, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mGpsText:Landroid/widget/TextView;

    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    const v7, 0x7f0a0012

    invoke-virtual {v6, v7}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 1056
    :try_start_1
    iget-object v5, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    invoke-interface {v5}, Lcom/htc/android/footprints/ILocationAgentService;->stopTracking()V

    .line 1057
    iget-object v5, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    const/4 v6, 0x1

    invoke-interface {v5, v6}, Lcom/htc/android/footprints/ILocationAgentService;->setTimeoutNotify(Z)V

    .line 1058
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->updateToFootprint()V

    .line 1059
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->updateAccuracyToIndicator()V
    :try_end_1
    .catch Landroid/os/RemoteException; {:try_start_1 .. :try_end_1} :catch_1

    .line 1066
    :goto_2
    invoke-virtual {p0, v8}, Lcom/htc/android/footprints/activity/PostcardActivity;->showDialog(I)V

    goto :goto_1

    .line 1062
    :catch_1
    move-exception v5

    move-object v1, v5

    .line 1063
    .local v1, e:Landroid/os/RemoteException;
    invoke-virtual {v1}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_2
.end method

.method private geocoderTitle(Landroid/location/Location;)V
    .locals 5
    .parameter "location"

    .prologue
    const-string v4, "PostcardActivity"

    .line 950
    invoke-virtual {p1}, Landroid/location/Location;->getProvider()Ljava/lang/String;

    move-result-object v2

    .line 951
    .local v2, source:Ljava/lang/String;
    invoke-static {p0}, Lcom/htc/android/footprints/utils/SettingInfo;->getInstance(Landroid/content/Context;)Lcom/htc/android/footprints/utils/SettingInfo;

    move-result-object v1

    .line 953
    .local v1, setting:Lcom/htc/android/footprints/utils/SettingInfo;
    const-string v3, "gps"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_0

    const-string v3, "map"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_2

    .line 955
    :cond_0
    const-string v3, "PostcardActivity"

    const-string v3, "geocoderTitle by using GPS"

    invoke-static {v4, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 957
    iget-boolean v3, v1, Lcom/htc/android/footprints/utils/SettingInfo;->retrieveAddress:Z

    if-eqz v3, :cond_1

    .line 959
    const/4 v3, 0x3

    invoke-virtual {p0, v3}, Lcom/htc/android/footprints/activity/PostcardActivity;->showDialog(I)V

    .line 966
    :cond_1
    :goto_0
    new-instance v0, Ljava/text/DecimalFormat;

    const-string v3, " ##000"

    invoke-direct {v0, v3}, Ljava/text/DecimalFormat;-><init>(Ljava/lang/String;)V

    .line 967
    .local v0, mf:Ljava/text/DecimalFormat;
    invoke-static {p0}, Lcom/htc/android/footprints/utils/TitleGenerator;->getInstance(Landroid/content/Context;)Lcom/htc/android/footprints/utils/TitleGenerator;

    move-result-object v3

    new-instance v4, Lcom/htc/android/footprints/activity/PostcardActivity$6;

    invoke-direct {v4, p0, v0, v1}, Lcom/htc/android/footprints/activity/PostcardActivity$6;-><init>(Lcom/htc/android/footprints/activity/PostcardActivity;Ljava/text/DecimalFormat;Lcom/htc/android/footprints/utils/SettingInfo;)V

    invoke-virtual {v3, p1, v4}, Lcom/htc/android/footprints/utils/TitleGenerator;->getTitleFromNetwork(Landroid/location/Location;Lcom/htc/android/footprints/utils/TitleGenerator$SearchListener;)V

    .line 1004
    return-void

    .line 962
    .end local v0           #mf:Ljava/text/DecimalFormat;
    :cond_2
    const-string v3, "PostcardActivity"

    const-string v3, "geocoderTitle by using network"

    invoke-static {v4, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0
.end method

.method private innerUnbindLocationAgentService(Z)V
    .locals 3
    .parameter "needShutdownAgent"

    .prologue
    .line 133
    :try_start_0
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    if-eqz v1, :cond_0

    .line 134
    const-string v1, "PostcardActivity"

    const-string v2, "removeCallback"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 135
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mCallback:Lcom/htc/android/footprints/ILocationAgentCallback;

    invoke-interface {v1, v2}, Lcom/htc/android/footprints/ILocationAgentService;->removeCallback(Lcom/htc/android/footprints/ILocationAgentCallback;)Z

    .line 136
    if-eqz p1, :cond_0

    .line 137
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    invoke-interface {v1}, Lcom/htc/android/footprints/ILocationAgentService;->shutdownAgent()V
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    .line 144
    :cond_0
    :goto_0
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mConnection:Landroid/content/ServiceConnection;

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/PostcardActivity;->unbindService(Landroid/content/ServiceConnection;)V

    .line 145
    const/4 v1, 0x0

    iput-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    .line 146
    const/4 v1, 0x0

    iput v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mBindState:I

    .line 147
    return-void

    .line 140
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 142
    .local v0, e:Landroid/os/RemoteException;
    invoke-virtual {v0}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_0
.end method

.method private removeQueuedMessages()V
    .locals 2

    .prologue
    .line 1071
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    const/16 v1, 0x32

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 1072
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    const/16 v1, 0x33

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 1073
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    const/16 v1, 0x34

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 1074
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    const/16 v1, 0x35

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 1075
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    const/16 v1, 0x36

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 1076
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    const/16 v1, 0x38

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 1077
    return-void
.end method

.method private setLocationText()V
    .locals 11

    .prologue
    const-wide v9, 0x412e848000000000L

    .line 835
    iget-object v7, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    if-eqz v7, :cond_0

    .line 836
    iget-object v7, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    invoke-virtual {v7}, Landroid/location/Location;->getLatitude()D

    move-result-wide v0

    .line 837
    .local v0, latitude:D
    iget-object v7, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    invoke-virtual {v7}, Landroid/location/Location;->getLongitude()D

    move-result-wide v2

    .line 839
    .local v2, longitude:D
    mul-double v7, v0, v9

    double-to-int v7, v7

    invoke-static {v7}, Lcom/htc/android/footprints/utils/FootprintUtils;->getFormatedLat(I)Ljava/lang/String;

    move-result-object v4

    .line 841
    .local v4, text_lat:Ljava/lang/String;
    mul-double v7, v2, v9

    double-to-int v7, v7

    invoke-static {v7}, Lcom/htc/android/footprints/utils/FootprintUtils;->getFormatedLon(I)Ljava/lang/String;

    move-result-object v6

    .line 843
    .local v6, text_lon:Ljava/lang/String;
    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v7, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, " . "

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    .line 844
    .local v5, text_location:Ljava/lang/String;
    iget-object v7, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mGpsText:Landroid/widget/TextView;

    invoke-virtual {v7, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 846
    .end local v0           #latitude:D
    .end local v2           #longitude:D
    .end local v4           #text_lat:Ljava/lang/String;
    .end local v5           #text_location:Ljava/lang/String;
    .end local v6           #text_lon:Ljava/lang/String;
    :cond_0
    return-void
.end method

.method private showAnimation()V
    .locals 7

    .prologue
    const/4 v6, 0x0

    .line 431
    const v3, 0x7f0c004b

    invoke-virtual {p0, v3}, Lcom/htc/android/footprints/activity/PostcardActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ViewSwitcher;

    .line 432
    .local v2, switcher:Landroid/widget/ViewSwitcher;
    const v3, 0x7f0c008f

    invoke-virtual {p0, v3}, Lcom/htc/android/footprints/activity/PostcardActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    .line 433
    .local v1, photoBG:Landroid/view/View;
    const v3, 0x7f0c008e

    invoke-virtual {p0, v3}, Lcom/htc/android/footprints/activity/PostcardActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    .line 435
    .local v0, initView:Landroid/widget/ImageView;
    invoke-static {}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getInstance()Lcom/htc/android/footprints/utils/camera/FootprintImageManager;

    move-result-object v3

    new-instance v4, Ljava/io/File;

    iget-object v5, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget-object v5, v5, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    invoke-direct {v4, v5}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, v4, p0}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getImage(Ljava/io/File;Landroid/content/Context;)Landroid/graphics/Bitmap;

    move-result-object v3

    invoke-virtual {v0, v3}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    .line 437
    invoke-virtual {v2}, Landroid/widget/ViewSwitcher;->reset()V

    .line 438
    invoke-virtual {v2, v6}, Landroid/widget/ViewSwitcher;->setAnimateFirstView(Z)V

    .line 439
    invoke-virtual {v2, v6}, Landroid/widget/ViewSwitcher;->setDisplayedChild(I)V

    .line 441
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v3

    const v4, 0x7f040003

    invoke-virtual {v2, v3, v4}, Landroid/widget/ViewSwitcher;->setInAnimation(Landroid/content/Context;I)V

    .line 443
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v3

    const v4, 0x7f04000d

    invoke-virtual {v2, v3, v4}, Landroid/widget/ViewSwitcher;->setOutAnimation(Landroid/content/Context;I)V

    .line 446
    new-instance v3, Landroid/os/Handler;

    invoke-direct {v3}, Landroid/os/Handler;-><init>()V

    new-instance v4, Lcom/htc/android/footprints/activity/PostcardActivity$2;

    invoke-direct {v4, p0, v2}, Lcom/htc/android/footprints/activity/PostcardActivity$2;-><init>(Lcom/htc/android/footprints/activity/PostcardActivity;Landroid/widget/ViewSwitcher;)V

    const-wide/16 v5, 0xa

    invoke-virtual {v3, v4, v5, v6}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 454
    return-void
.end method

.method private unbindLocationAgentService(Z)V
    .locals 3
    .parameter "needShutdownAgent"

    .prologue
    const-string v2, "PostcardActivity"

    .line 150
    const-string v0, "PostcardActivity"

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "unbind LocationAgentService. mBindState = "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mBindState:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v2, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 151
    iget v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mBindState:I

    const/4 v1, 0x1

    if-ne v0, v1, :cond_1

    .line 153
    const-string v0, "PostcardActivity"

    const-string v0, "LocationAgentService is still in binding. but user call unbind"

    invoke-static {v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 155
    invoke-direct {p0, p1}, Lcom/htc/android/footprints/activity/PostcardActivity;->innerUnbindLocationAgentService(Z)V

    .line 161
    :cond_0
    :goto_0
    return-void

    .line 156
    :cond_1
    iget v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mBindState:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_2

    .line 157
    invoke-direct {p0, p1}, Lcom/htc/android/footprints/activity/PostcardActivity;->innerUnbindLocationAgentService(Z)V

    goto :goto_0

    .line 158
    :cond_2
    iget v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mBindState:I

    if-nez v0, :cond_0

    .line 159
    const-string v0, "PostcardActivity"

    const-string v0, "LocationAgentService is not bind. but user call unbind"

    invoke-static {v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0
.end method

.method private updateAccuracyToIndicator()V
    .locals 3

    .prologue
    const/4 v2, 0x5

    .line 849
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mAccuracy:I

    if-nez v0, :cond_1

    .line 850
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mIndicator:Landroid/widget/ImageView;

    const/4 v1, 0x6

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageLevel(I)V

    .line 856
    :cond_0
    :goto_0
    return-void

    .line 851
    :cond_1
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mAccuracy:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_2

    .line 852
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mIndicator:Landroid/widget/ImageView;

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setImageLevel(I)V

    goto :goto_0

    .line 853
    :cond_2
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mAccuracy:I

    const/4 v1, 0x3

    if-ne v0, v1, :cond_0

    .line 854
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mIndicator:Landroid/widget/ImageView;

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setImageLevel(I)V

    goto :goto_0
.end method

.method private updateToFootprint()V
    .locals 5

    .prologue
    const-wide v3, 0x412e848000000000L

    .line 942
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    if-eqz v0, :cond_0

    .line 943
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    invoke-virtual {v1}, Landroid/location/Location;->getProvider()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/vo/Footprint;->setAccuracyByProvider(Ljava/lang/String;)V

    .line 944
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    invoke-virtual {v1}, Landroid/location/Location;->getLatitude()D

    move-result-wide v1

    mul-double/2addr v1, v3

    double-to-int v1, v1

    iput v1, v0, Lcom/htc/android/footprints/vo/Footprint;->mLatitude:I

    .line 945
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    invoke-virtual {v1}, Landroid/location/Location;->getLongitude()D

    move-result-wide v1

    mul-double/2addr v1, v3

    double-to-int v1, v1

    iput v1, v0, Lcom/htc/android/footprints/vo/Footprint;->mLongitude:I

    .line 947
    :cond_0
    return-void
.end method


# virtual methods
.method public createFootprint(Ljava/lang/String;)Lcom/htc/android/footprints/vo/Footprint;
    .locals 6
    .parameter "photo_path"

    .prologue
    const-wide v4, 0x412e848000000000L

    const-string v2, ""

    .line 906
    new-instance v1, Lcom/htc/android/footprints/vo/Footprint;

    invoke-direct {v1}, Lcom/htc/android/footprints/vo/Footprint;-><init>()V

    .line 909
    .local v1, footprint:Lcom/htc/android/footprints/vo/Footprint;
    if-eqz p1, :cond_1

    :try_start_0
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v2

    const/16 v3, 0xa

    if-le v2, v3, :cond_1

    .line 912
    invoke-virtual {v1, p1}, Lcom/htc/android/footprints/vo/Footprint;->setPic(Ljava/lang/String;)V

    .line 917
    :goto_0
    const-string v2, ""

    invoke-virtual {v1, v2}, Lcom/htc/android/footprints/vo/Footprint;->setAudio(Ljava/lang/String;)V

    .line 918
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    invoke-static {v2}, Lcom/htc/android/footprints/utils/FootprintUtils;->getDefaultName(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, v1, Lcom/htc/android/footprints/vo/Footprint;->mName:Ljava/lang/String;

    .line 920
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    iput-wide v2, v1, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    .line 924
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mSelectedCateoryStr:Ljava/lang/String;

    iput-object v2, v1, Lcom/htc/android/footprints/vo/Footprint;->mCategory:Ljava/lang/String;

    .line 926
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    if-eqz v2, :cond_0

    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    invoke-virtual {v2}, Landroid/location/Location;->getProvider()Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_0

    .line 927
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    invoke-virtual {v2}, Landroid/location/Location;->getLatitude()D

    move-result-wide v2

    mul-double/2addr v2, v4

    invoke-static {v2, v3}, Ljava/lang/Math;->round(D)J

    move-result-wide v2

    long-to-int v2, v2

    iput v2, v1, Lcom/htc/android/footprints/vo/Footprint;->mLatitude:I

    .line 929
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    invoke-virtual {v2}, Landroid/location/Location;->getLongitude()D

    move-result-wide v2

    mul-double/2addr v2, v4

    invoke-static {v2, v3}, Ljava/lang/Math;->round(D)J

    move-result-wide v2

    long-to-int v2, v2

    iput v2, v1, Lcom/htc/android/footprints/vo/Footprint;->mLongitude:I

    .line 931
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    invoke-virtual {v2}, Landroid/location/Location;->getProvider()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/htc/android/footprints/vo/Footprint;->setAccuracyByProvider(Ljava/lang/String;)V

    :cond_0
    move-object v2, v1

    .line 938
    :goto_1
    return-object v2

    .line 914
    :cond_1
    const-string v2, ""

    invoke-virtual {v1, v2}, Lcom/htc/android/footprints/vo/Footprint;->setPic(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 934
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 935
    .local v0, e:Ljava/lang/Exception;
    const-string v2, "PostcardActivity"

    const-string v3, "saveFootprint exception"

    invoke-static {v2, v3, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 936
    const/4 v2, 0x0

    goto :goto_1
.end method

.method initView()V
    .locals 2

    .prologue
    .line 457
    const v0, 0x7f0c0090

    invoke-virtual {p0, v0}, Lcom/htc/android/footprints/activity/PostcardActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mPostCardPreview:Landroid/widget/ImageView;

    .line 459
    const v0, 0x7f0c0091

    invoke-virtual {p0, v0}, Lcom/htc/android/footprints/activity/PostcardActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprintTitle:Landroid/widget/TextView;

    .line 460
    const v0, 0x7f0c0092

    invoke-virtual {p0, v0}, Lcom/htc/android/footprints/activity/PostcardActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprintAddDate:Landroid/widget/TextView;

    .line 461
    const v0, 0x7f0c0064

    invoke-virtual {p0, v0}, Lcom/htc/android/footprints/activity/PostcardActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonDone:Landroid/view/View;

    .line 463
    const v0, 0x7f0c0093

    invoke-virtual {p0, v0}, Lcom/htc/android/footprints/activity/PostcardActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/htc/android/footprints/view/PlayButton;

    iput-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonPlay:Lcom/htc/android/footprints/view/PlayButton;

    .line 464
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonPlay:Lcom/htc/android/footprints/view/PlayButton;

    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/view/PlayButton;->setfootprintData(Lcom/htc/android/footprints/vo/Footprint;)V

    .line 465
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    invoke-static {v0}, Lcom/htc/android/footprints/utils/FootprintUtils;->checkAudioData(Lcom/htc/android/footprints/vo/Footprint;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 466
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonPlay:Lcom/htc/android/footprints/view/PlayButton;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/view/PlayButton;->setVisibility(I)V

    .line 470
    :goto_0
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mPostCardPreview:Landroid/widget/ImageView;

    invoke-virtual {v0, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 471
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonDone:Landroid/view/View;

    invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 473
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->needAnimation:Z

    .line 474
    return-void

    .line 468
    :cond_0
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonPlay:Lcom/htc/android/footprints/view/PlayButton;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/view/PlayButton;->setVisibility(I)V

    goto :goto_0
.end method

.method protected onActivityResult(IILandroid/content/Intent;)V
    .locals 18
    .parameter "requestCode"
    .parameter "resultCode"
    .parameter "intent"

    .prologue
    .line 479
    const-string v14, "PostcardActivity"

    new-instance v15, Ljava/lang/StringBuilder;

    invoke-direct {v15}, Ljava/lang/StringBuilder;-><init>()V

    const-string v16, "onActivityResult, requestCode = "

    invoke-virtual/range {v15 .. v16}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    move-object v0, v15

    move/from16 v1, p1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v15

    invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v15

    invoke-static {v14, v15}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 481
    const/4 v14, 0x1

    move/from16 v0, p1

    move v1, v14

    if-ne v0, v1, :cond_5

    .line 482
    const/4 v14, 0x0

    move v0, v14

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/htc/android/footprints/activity/PostcardActivity;->isPickerRunning:Z

    .line 485
    :try_start_0
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->gpsEnabled:Z

    move v14, v0

    if-eqz v14, :cond_0

    .line 486
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    move-object v14, v0

    const/4 v15, 0x1

    invoke-interface {v14, v15}, Lcom/htc/android/footprints/ILocationAgentService;->setTimeoutNotify(Z)V
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    .line 492
    :cond_0
    :goto_0
    const/4 v14, -0x1

    move/from16 v0, p2

    move v1, v14

    if-ne v0, v1, :cond_3

    .line 494
    :try_start_1
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->gpsEnabled:Z

    move v14, v0

    if-eqz v14, :cond_1

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    move-object v14, v0

    invoke-interface {v14}, Lcom/htc/android/footprints/ILocationAgentService;->isTracking()Z

    move-result v14

    if-eqz v14, :cond_1

    .line 495
    const-string v14, "PostcardActivity"

    const-string v15, "mService "

    invoke-static {v14, v15}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 496
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    move-object v14, v0

    invoke-interface {v14}, Lcom/htc/android/footprints/ILocationAgentService;->stopTracking()V
    :try_end_1
    .catch Landroid/os/RemoteException; {:try_start_1 .. :try_end_1} :catch_1

    .line 502
    :cond_1
    :goto_1
    const-string v14, "RETURN_LATITUDE"

    const-wide/16 v15, 0x0

    move-object/from16 v0, p3

    move-object v1, v14

    move-wide v2, v15

    invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->getDoubleExtra(Ljava/lang/String;D)D

    move-result-wide v9

    .line 503
    .local v9, latitude:D
    const-string v14, "RETURN_LONGITUDE"

    const-wide/16 v15, 0x0

    move-object/from16 v0, p3

    move-object v1, v14

    move-wide v2, v15

    invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->getDoubleExtra(Ljava/lang/String;D)D

    move-result-wide v12

    .line 504
    .local v12, longitude:D
    new-instance v11, Landroid/location/Location;

    const-string v14, "map"

    invoke-direct {v11, v14}, Landroid/location/Location;-><init>(Ljava/lang/String;)V

    .line 506
    .local v11, location:Landroid/location/Location;
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v14

    invoke-virtual {v11, v14, v15}, Landroid/location/Location;->setTime(J)V

    .line 507
    invoke-virtual {v11, v9, v10}, Landroid/location/Location;->setLatitude(D)V

    .line 508
    invoke-virtual {v11, v12, v13}, Landroid/location/Location;->setLongitude(D)V

    .line 509
    move-object v0, v11

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    .line 510
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mIndicator:Landroid/widget/ImageView;

    move-object v14, v0

    const/4 v15, 0x0

    invoke-virtual {v14, v15}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 514
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    move-object v14, v0

    const/16 v15, 0x36

    const-wide/16 v16, 0xc8

    invoke-virtual/range {v14 .. v17}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    .line 515
    const-string v14, "PostcardActivity"

    const-string v15, "onActivityResult call HANDLE_GEOCODER_BY_GPS"

    invoke-static {v14, v15}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 517
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    move-object v14, v0

    const/16 v15, 0x34

    invoke-virtual {v14, v15}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    .line 615
    .end local v9           #latitude:D
    .end local v11           #location:Landroid/location/Location;
    .end local v12           #longitude:D
    .end local p1
    :cond_2
    :goto_2
    return-void

    .line 488
    .restart local p1
    :catch_0
    move-exception v14

    move-object v6, v14

    .line 489
    .local v6, e1:Landroid/os/RemoteException;
    invoke-virtual {v6}, Landroid/os/RemoteException;->printStackTrace()V

    goto/16 :goto_0

    .line 498
    .end local v6           #e1:Landroid/os/RemoteException;
    :catch_1
    move-exception v14

    move-object v5, v14

    .line 499
    .local v5, e:Landroid/os/RemoteException;
    invoke-virtual {v5}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_1

    .line 522
    .end local v5           #e:Landroid/os/RemoteException;
    :cond_3
    :try_start_2
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->gpsEnabled:Z

    move v14, v0

    if-eqz v14, :cond_4

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    move-object v14, v0

    invoke-interface {v14}, Lcom/htc/android/footprints/ILocationAgentService;->isTracking()Z

    move-result v14

    if-nez v14, :cond_2

    .line 525
    :cond_4
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    move-object v14, v0

    const/16 v15, 0x36

    const-wide/16 v16, 0x1f4

    invoke-virtual/range {v14 .. v17}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z
    :try_end_2
    .catch Landroid/os/RemoteException; {:try_start_2 .. :try_end_2} :catch_2

    goto :goto_2

    .line 528
    :catch_2
    move-exception v14

    move-object v5, v14

    .line 529
    .restart local v5       #e:Landroid/os/RemoteException;
    invoke-virtual {v5}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_2

    .line 533
    .end local v5           #e:Landroid/os/RemoteException;
    :cond_5
    const/16 v14, 0x15b3

    move/from16 v0, p1

    move v1, v14

    if-ne v0, v1, :cond_9

    .line 535
    const/4 v14, 0x0

    move v0, v14

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/htc/android/footprints/activity/PostcardActivity;->isRecaptureRunning:Z

    .line 536
    const/4 v14, -0x1

    move/from16 v0, p2

    move v1, v14

    if-ne v0, v1, :cond_2

    .line 540
    const-string v14, "FIX_LOCATION"

    move-object/from16 v0, p3

    move-object v1, v14

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v11

    check-cast v11, Landroid/location/Location;

    .line 542
    .restart local v11       #location:Landroid/location/Location;
    if-eqz v11, :cond_6

    .line 543
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    move-object v14, v0

    if-nez v14, :cond_7

    .line 544
    new-instance v14, Landroid/location/Location;

    const-string v15, "gps"

    invoke-direct {v14, v15}, Landroid/location/Location;-><init>(Ljava/lang/String;)V

    move-object v0, v14

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    .line 545
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    move-object v14, v0

    invoke-virtual {v14, v11}, Landroid/location/Location;->set(Landroid/location/Location;)V

    .line 551
    :goto_3
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    move-object v14, v0

    const/16 v15, 0x36

    const-wide/16 v16, 0x1f4

    invoke-virtual/range {v14 .. v17}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    .line 567
    :cond_6
    const-string v14, "EXTRA_PHOTO_PATH"

    move-object/from16 v0, p3

    move-object v1, v14

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    .line 569
    .local v8, imagepath:Ljava/lang/String;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mPostCardPreview:Landroid/widget/ImageView;

    move-object v14, v0

    invoke-static {}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getInstance()Lcom/htc/android/footprints/utils/camera/FootprintImageManager;

    move-result-object v15

    new-instance v16, Ljava/io/File;

    move-object/from16 v0, v16

    move-object v1, v8

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual/range {p0 .. p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v17

    invoke-virtual/range {v15 .. v17}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getImage(Ljava/io/File;Landroid/content/Context;)Landroid/graphics/Bitmap;

    move-result-object v15

    invoke-virtual {v14, v15}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    .line 571
    if-eqz v8, :cond_8

    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v14

    if-lez v14, :cond_8

    .line 572
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    move-object v14, v0

    iput-object v8, v14, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    .line 574
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    move-object v14, v0

    const-string v15, "/"

    invoke-virtual {v8, v15}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v15

    add-int/lit8 v15, v15, 0xb

    invoke-virtual {v8, v15}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v15

    iput-object v15, v14, Lcom/htc/android/footprints/vo/Footprint;->mPicFileName:Ljava/lang/String;

    .line 580
    :goto_4
    const/4 v14, 0x1

    move v0, v14

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/htc/android/footprints/activity/PostcardActivity;->needAnimation:Z

    goto/16 :goto_2

    .line 547
    .end local v8           #imagepath:Ljava/lang/String;
    :cond_7
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    move-object v14, v0

    invoke-virtual {v14, v11}, Landroid/location/Location;->set(Landroid/location/Location;)V

    goto :goto_3

    .line 577
    .restart local v8       #imagepath:Ljava/lang/String;
    :cond_8
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    move-object v14, v0

    const-string v15, ""

    iput-object v15, v14, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    .line 578
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    move-object v14, v0

    const-string v15, ""

    iput-object v15, v14, Lcom/htc/android/footprints/vo/Footprint;->mPicFileName:Ljava/lang/String;

    goto :goto_4

    .line 581
    .end local v8           #imagepath:Ljava/lang/String;
    .end local v11           #location:Landroid/location/Location;
    :cond_9
    const/16 v14, 0x12

    move/from16 v0, p1

    move v1, v14

    if-ne v0, v1, :cond_2

    .line 582
    const/4 v14, -0x1

    move/from16 v0, p2

    move v1, v14

    if-ne v0, v1, :cond_c

    .line 583
    const-string v14, "PostcardActivity"

    const-string v15, "REQUEST_DETAIL_EDIT, RESULT_OK"

    invoke-static {v14, v15}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 584
    const-string v14, "DATA"

    move-object/from16 v0, p3

    move-object v1, v14

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object p1

    .end local p1
    check-cast p1, Lcom/htc/android/footprints/vo/Footprint;

    move-object/from16 v0, p1

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    .line 585
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprintTitle:Landroid/widget/TextView;

    move-object v14, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    move-object v15, v0

    iget-object v15, v15, Lcom/htc/android/footprints/vo/Footprint;->mName:Ljava/lang/String;

    invoke-virtual {v14, v15}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 586
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonPlay:Lcom/htc/android/footprints/view/PlayButton;

    move-object v14, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    move-object v15, v0

    invoke-virtual {v14, v15}, Lcom/htc/android/footprints/view/PlayButton;->setfootprintData(Lcom/htc/android/footprints/vo/Footprint;)V

    .line 587
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    move-object v14, v0

    invoke-static {v14}, Lcom/htc/android/footprints/utils/FootprintUtils;->checkAudioData(Lcom/htc/android/footprints/vo/Footprint;)Z

    move-result v14

    if-eqz v14, :cond_b

    .line 588
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonPlay:Lcom/htc/android/footprints/view/PlayButton;

    move-object v14, v0

    const/4 v15, 0x0

    invoke-virtual {v14, v15}, Lcom/htc/android/footprints/view/PlayButton;->setVisibility(I)V

    .line 592
    :goto_5
    invoke-static {}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getInstance()Lcom/htc/android/footprints/utils/camera/FootprintImageManager;

    move-result-object v14

    new-instance v15, Ljava/io/File;

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    move-object/from16 v16, v0

    move-object/from16 v0, v16

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    move-object/from16 v16, v0

    invoke-direct/range {v15 .. v16}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    move-object v0, v14

    move-object v1, v15

    move-object/from16 v2, p0

    invoke-virtual {v0, v1, v2}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getImage(Ljava/io/File;Landroid/content/Context;)Landroid/graphics/Bitmap;

    move-result-object v4

    .line 594
    .local v4, bmp:Landroid/graphics/Bitmap;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mPostCardPreview:Landroid/widget/ImageView;

    move-object v14, v0

    invoke-virtual {v14, v4}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    .line 595
    invoke-virtual/range {p0 .. p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->finish()V

    .line 613
    .end local v4           #bmp:Landroid/graphics/Bitmap;
    :cond_a
    :goto_6
    invoke-direct/range {p0 .. p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->updateAccuracyToIndicator()V

    goto/16 :goto_2

    .line 590
    :cond_b
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonPlay:Lcom/htc/android/footprints/view/PlayButton;

    move-object v14, v0

    const/4 v15, 0x4

    invoke-virtual {v14, v15}, Lcom/htc/android/footprints/view/PlayButton;->setVisibility(I)V

    goto :goto_5

    .line 598
    .restart local p1
    :cond_c
    const-string v14, "DATA"

    move-object/from16 v0, p3

    move-object v1, v14

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v7

    check-cast v7, Lcom/htc/android/footprints/vo/Footprint;

    .line 599
    .local v7, footprint:Lcom/htc/android/footprints/vo/Footprint;
    if-eqz v7, :cond_a

    .line 600
    move-object v0, v7

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    .line 601
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprintTitle:Landroid/widget/TextView;

    move-object v14, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    move-object v15, v0

    iget-object v15, v15, Lcom/htc/android/footprints/vo/Footprint;->mName:Ljava/lang/String;

    invoke-virtual {v14, v15}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 602
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonPlay:Lcom/htc/android/footprints/view/PlayButton;

    move-object v14, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    move-object v15, v0

    invoke-virtual {v14, v15}, Lcom/htc/android/footprints/view/PlayButton;->setfootprintData(Lcom/htc/android/footprints/vo/Footprint;)V

    .line 603
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    move-object v14, v0

    invoke-static {v14}, Lcom/htc/android/footprints/utils/FootprintUtils;->checkAudioData(Lcom/htc/android/footprints/vo/Footprint;)Z

    move-result v14

    if-eqz v14, :cond_d

    .line 604
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonPlay:Lcom/htc/android/footprints/view/PlayButton;

    move-object v14, v0

    const/4 v15, 0x0

    invoke-virtual {v14, v15}, Lcom/htc/android/footprints/view/PlayButton;->setVisibility(I)V

    .line 608
    :goto_7
    invoke-static {}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getInstance()Lcom/htc/android/footprints/utils/camera/FootprintImageManager;

    move-result-object v14

    new-instance v15, Ljava/io/File;

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    move-object/from16 v16, v0

    move-object/from16 v0, v16

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    move-object/from16 v16, v0

    invoke-direct/range {v15 .. v16}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    move-object v0, v14

    move-object v1, v15

    move-object/from16 v2, p0

    invoke-virtual {v0, v1, v2}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getImage(Ljava/io/File;Landroid/content/Context;)Landroid/graphics/Bitmap;

    move-result-object v4

    .line 610
    .restart local v4       #bmp:Landroid/graphics/Bitmap;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->mPostCardPreview:Landroid/widget/ImageView;

    move-object v14, v0

    invoke-virtual {v14, v4}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    goto :goto_6

    .line 606
    .end local v4           #bmp:Landroid/graphics/Bitmap;
    :cond_d
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonPlay:Lcom/htc/android/footprints/view/PlayButton;

    move-object v14, v0

    const/4 v15, 0x4

    invoke-virtual {v14, v15}, Lcom/htc/android/footprints/view/PlayButton;->setVisibility(I)V

    goto :goto_7
.end method

.method public onClick(Landroid/view/View;)V
    .locals 3
    .parameter "view"

    .prologue
    .line 859
    invoke-virtual {p1}, Landroid/view/View;->isEnabled()Z

    move-result v1

    if-nez v1, :cond_1

    .line 885
    :cond_0
    :goto_0
    return-void

    .line 862
    :cond_1
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonDone:Landroid/view/View;

    if-ne p1, v1, :cond_0

    .line 863
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->updateToFootprint()V

    .line 864
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    invoke-static {v1}, Lcom/htc/android/footprints/utils/FootprintUtils;->setLocationToPicture(Lcom/htc/android/footprints/vo/Footprint;)V

    .line 865
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget-object v2, v2, Lcom/htc/android/footprints/vo/Footprint;->mPicFileName:Ljava/lang/String;

    invoke-static {v1, v2}, Lcom/htc/android/footprints/utils/FootprintUtils;->forceSync(Landroid/content/ContentResolver;Ljava/lang/String;)V

    .line 867
    invoke-virtual {p0, p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->saveFootprint(Landroid/content/Context;)Z

    .line 870
    :try_start_0
    iget-boolean v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->gpsEnabled:Z

    if-eqz v1, :cond_2

    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    if-eqz v1, :cond_2

    .line 871
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    invoke-interface {v1}, Lcom/htc/android/footprints/ILocationAgentService;->stopTrackingWithoutNotify()V
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    .line 878
    :cond_2
    :goto_1
    iget-boolean v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isLanuchByWidget:Z

    if-eqz v1, :cond_3

    .line 879
    const-string v1, "PostcardActivity"

    const-string v2, "LanuchByWidget"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 880
    invoke-static {}, Lcom/htc/android/footprints/utils/FootprintUtils;->setWidgetFlag()V

    .line 883
    :cond_3
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->finish()V

    goto :goto_0

    .line 873
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 874
    .local v0, e:Landroid/os/RemoteException;
    invoke-virtual {v0}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_1
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 14
    .parameter "savedInstanceState"

    .prologue
    .line 167
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 168
    const-string v10, "PostcardActivity"

    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    const-string v12, "onCreate, savedInstanceState = "

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    invoke-static {v10, v11}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 170
    const/4 v10, 0x3

    invoke-virtual {p0, v10}, Lcom/htc/android/footprints/activity/PostcardActivity;->setVolumeControlStream(I)V

    .line 171
    const/4 v10, 0x1

    invoke-virtual {p0, v10}, Lcom/htc/android/footprints/activity/PostcardActivity;->requestWindowFeature(I)Z

    .line 173
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    .line 174
    .local v0, activityIntent:Landroid/content/Intent;
    const-string v10, "FIX_NETWORK"

    invoke-virtual {v0, v10}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v1

    check-cast v1, Landroid/location/Location;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixNetwork:Landroid/location/Location;

    .line 176
    const-string v10, "FIX_LOCATION"

    invoke-virtual {v0, v10}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v3

    check-cast v3, Landroid/location/Location;

    .line 178
    .local v3, location:Landroid/location/Location;
    iput-object v3, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    .line 180
    const-string v10, "CATEGORY"

    invoke-virtual {v0, v10}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v1

    check-cast v1, Lcom/htc/android/footprints/vo/Category;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mSelectedCategory:Lcom/htc/android/footprints/vo/Category;

    .line 181
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mSelectedCategory:Lcom/htc/android/footprints/vo/Category;

    if-eqz v10, :cond_7

    .line 182
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mSelectedCategory:Lcom/htc/android/footprints/vo/Category;

    iget-object v10, v10, Lcom/htc/android/footprints/vo/Category;->mKeyword:Ljava/lang/String;

    const-string v11, ""

    invoke-virtual {v10, v11}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v10

    if-eqz v10, :cond_6

    .line 183
    const-string v10, "favorite"

    iput-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mSelectedCateoryStr:Ljava/lang/String;

    .line 190
    :goto_0
    const-string v10, "EXTRA_PHOTO_PATH"

    invoke-virtual {v0, v10}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {p0, v10}, Lcom/htc/android/footprints/activity/PostcardActivity;->createFootprint(Ljava/lang/String;)Lcom/htc/android/footprints/vo/Footprint;

    move-result-object v10

    iput-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    .line 193
    const-string v10, "PostcardActivity"

    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    const-string v12, "get category from parcel: "

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    iget-object v12, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mSelectedCateoryStr:Ljava/lang/String;

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    invoke-static {v10, v11}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 195
    const v10, 0x7f03001e

    invoke-virtual {p0, v10}, Lcom/htc/android/footprints/activity/PostcardActivity;->setContentView(I)V

    .line 197
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->initView()V

    .line 199
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v10

    invoke-static {v10}, Landroid/text/format/DateFormat;->getDateFormat(Landroid/content/Context;)Ljava/text/DateFormat;

    move-result-object v2

    .line 201
    .local v2, df:Ljava/text/DateFormat;
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprintAddDate:Landroid/widget/TextView;

    new-instance v11, Ljava/util/Date;

    iget-object v12, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget-wide v12, v12, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    invoke-direct {v11, v12, v13}, Ljava/util/Date;-><init>(J)V

    invoke-virtual {v2, v11}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v10, v11}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 203
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mPostCardPreview:Landroid/widget/ImageView;

    invoke-static {}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getInstance()Lcom/htc/android/footprints/utils/camera/FootprintImageManager;

    move-result-object v11

    new-instance v12, Ljava/io/File;

    const-string v13, "EXTRA_PHOTO_PATH"

    invoke-virtual {v0, v13}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v13

    invoke-direct {v12, v13}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v13

    invoke-virtual {v11, v12, v13}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getImage(Ljava/io/File;Landroid/content/Context;)Landroid/graphics/Bitmap;

    move-result-object v11

    invoke-virtual {v10, v11}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    .line 209
    const v10, 0x7f0c0058

    invoke-virtual {p0, v10}, Lcom/htc/android/footprints/activity/PostcardActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mIndicator:Landroid/widget/ImageView;

    .line 210
    const v10, 0x7f0c0059

    invoke-virtual {p0, v10}, Lcom/htc/android/footprints/activity/PostcardActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mGpsText:Landroid/widget/TextView;

    .line 212
    new-instance v4, Ljava/text/DecimalFormat;

    const-string v10, " ##000"

    invoke-direct {v4, v10}, Ljava/text/DecimalFormat;-><init>(Ljava/lang/String;)V

    .line 213
    .local v4, mf:Ljava/text/DecimalFormat;
    const-string v10, "TITLE_NAME"

    invoke-virtual {v0, v10}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    .line 214
    .local v8, title:Ljava/lang/String;
    invoke-static {p0}, Lcom/htc/android/footprints/utils/SettingInfo;->getInstance(Landroid/content/Context;)Lcom/htc/android/footprints/utils/SettingInfo;

    move-result-object v10

    invoke-virtual {v10}, Lcom/htc/android/footprints/utils/SettingInfo;->getCurrentSerialNumber()I

    move-result v7

    .line 215
    .local v7, sn:I
    if-nez v8, :cond_8

    .line 216
    invoke-static {p0}, Lcom/htc/android/footprints/utils/TitleGenerator;->getInstance(Landroid/content/Context;)Lcom/htc/android/footprints/utils/TitleGenerator;

    move-result-object v10

    invoke-virtual {v10}, Lcom/htc/android/footprints/utils/TitleGenerator;->getTitleFromMccTable()Ljava/lang/String;

    move-result-object v8

    .line 217
    if-eqz v8, :cond_0

    .line 218
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v11, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    int-to-long v12, v7

    invoke-virtual {v4, v12, v13}, Ljava/text/DecimalFormat;->format(J)Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    iput-object v11, v10, Lcom/htc/android/footprints/vo/Footprint;->mName:Ljava/lang/String;

    .line 224
    :cond_0
    :goto_1
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprintTitle:Landroid/widget/TextView;

    iget-object v11, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget-object v11, v11, Lcom/htc/android/footprints/vo/Footprint;->mName:Ljava/lang/String;

    invoke-virtual {v10, v11}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 227
    const-string v10, "ADDRESS"

    invoke-virtual {v0, v10}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 228
    .local v1, address:Ljava/lang/String;
    if-eqz v1, :cond_1

    .line 229
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iput-object v1, v10, Lcom/htc/android/footprints/vo/Footprint;->mAddr:Ljava/lang/String;

    .line 231
    :cond_1
    const-string v10, "PHONE"

    invoke-virtual {v0, v10}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    .line 232
    .local v5, phone:Ljava/lang/String;
    if-eqz v5, :cond_2

    .line 233
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iput-object v5, v10, Lcom/htc/android/footprints/vo/Footprint;->mTel:Ljava/lang/String;

    .line 235
    :cond_2
    const-string v10, "WEBSITE"

    invoke-virtual {v0, v10}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    .line 236
    .local v9, url:Ljava/lang/String;
    if-eqz v9, :cond_3

    .line 237
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iput-object v9, v10, Lcom/htc/android/footprints/vo/Footprint;->mSite:Ljava/lang/String;

    .line 240
    :cond_3
    new-instance v10, Lcom/htc/android/footprints/utils/StorageUtil;

    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v11

    invoke-direct {v10, v11}, Lcom/htc/android/footprints/utils/StorageUtil;-><init>(Landroid/content/Context;)V

    iput-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

    .line 241
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

    new-instance v11, Lcom/htc/android/footprints/activity/PostcardActivity$1;

    invoke-direct {v11, p0}, Lcom/htc/android/footprints/activity/PostcardActivity$1;-><init>(Lcom/htc/android/footprints/activity/PostcardActivity;)V

    invoke-virtual {v10, v11}, Lcom/htc/android/footprints/utils/StorageUtil;->SetOnChangeStorageListerner(Lcom/htc/android/footprints/utils/StorageUtil$OnChangeStorageListener;)V

    .line 250
    const-string v10, "location"

    invoke-virtual {p0, v10}, Lcom/htc/android/footprints/activity/PostcardActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Landroid/location/LocationManager;

    .line 251
    .local v6, service:Landroid/location/LocationManager;
    const-string v10, "gps"

    invoke-virtual {v6, v10}, Landroid/location/LocationManager;->isProviderEnabled(Ljava/lang/String;)Z

    move-result v10

    iput-boolean v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->gpsEnabled:Z

    .line 252
    if-nez p1, :cond_4

    if-nez v3, :cond_4

    .line 253
    iget-boolean v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->gpsEnabled:Z

    if-eqz v10, :cond_9

    .line 254
    const-string v10, "PostcardActivity"

    const-string v11, "onCreate. call bind service"

    invoke-static {v10, v11}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 255
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->bindLocationAgentService()V

    .line 258
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    const/16 v11, 0x32

    invoke-virtual {v10, v11}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    .line 266
    :cond_4
    :goto_2
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    if-eqz v10, :cond_a

    .line 268
    const-string v10, "PostcardActivity"

    const-string v11, "onCreate call HANDLE_UPDATE_INDICATOR"

    invoke-static {v10, v11}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 269
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    const/16 v11, 0x36

    const-wide/16 v12, 0xc8

    invoke-virtual {v10, v11, v12, v13}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    .line 271
    const-string v10, "PostcardActivity"

    const-string v11, "onCreate call HANDLE_GEOCODER_BY_GPS"

    invoke-static {v10, v11}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 272
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    const/16 v11, 0x34

    const-wide/16 v12, 0x1f4

    invoke-virtual {v10, v11, v12, v13}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    .line 279
    :cond_5
    :goto_3
    const-string v10, "LAUNCH_BY_WIDGET"

    const/4 v11, 0x0

    invoke-virtual {v0, v10, v11}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v10

    iput-boolean v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isLanuchByWidget:Z

    .line 281
    const-string v10, "PostcardActivity"

    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    const-string v12, "isLanuchByWidget = "

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    iget-boolean v12, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isLanuchByWidget:Z

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    invoke-static {v10, v11}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 282
    return-void

    .line 185
    .end local v1           #address:Ljava/lang/String;
    .end local v2           #df:Ljava/text/DateFormat;
    .end local v4           #mf:Ljava/text/DecimalFormat;
    .end local v5           #phone:Ljava/lang/String;
    .end local v6           #service:Landroid/location/LocationManager;
    .end local v7           #sn:I
    .end local v8           #title:Ljava/lang/String;
    .end local v9           #url:Ljava/lang/String;
    :cond_6
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mSelectedCategory:Lcom/htc/android/footprints/vo/Category;

    iget-object v10, v10, Lcom/htc/android/footprints/vo/Category;->mKeyword:Ljava/lang/String;

    iput-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mSelectedCateoryStr:Ljava/lang/String;

    goto/16 :goto_0

    .line 187
    :cond_7
    const-string v10, "favorite"

    iput-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mSelectedCateoryStr:Ljava/lang/String;

    goto/16 :goto_0

    .line 222
    .restart local v2       #df:Ljava/text/DateFormat;
    .restart local v4       #mf:Ljava/text/DecimalFormat;
    .restart local v7       #sn:I
    .restart local v8       #title:Ljava/lang/String;
    :cond_8
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iput-object v8, v10, Lcom/htc/android/footprints/vo/Footprint;->mName:Ljava/lang/String;

    goto/16 :goto_1

    .line 260
    .restart local v1       #address:Ljava/lang/String;
    .restart local v5       #phone:Ljava/lang/String;
    .restart local v6       #service:Landroid/location/LocationManager;
    .restart local v9       #url:Ljava/lang/String;
    :cond_9
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mGpsText:Landroid/widget/TextView;

    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v11

    const v12, 0x7f0a0014

    invoke-virtual {v11, v12}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v10, v11}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 262
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mIndicator:Landroid/widget/ImageView;

    const/4 v11, 0x6

    invoke-virtual {v10, v11}, Landroid/widget/ImageView;->setImageLevel(I)V

    goto :goto_2

    .line 275
    :cond_a
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixNetwork:Landroid/location/Location;

    if-eqz v10, :cond_5

    .line 276
    iget-object v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    const/16 v11, 0x35

    const-wide/16 v12, 0xbb8

    invoke-virtual {v10, v11, v12, v13}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    goto :goto_3
.end method

.method protected onCreateDialog(I)Landroid/app/Dialog;
    .locals 6
    .parameter "id"

    .prologue
    const/4 v5, 0x0

    const v3, 0x7f0200ad

    const/4 v4, 0x1

    .line 1146
    packed-switch p1, :pswitch_data_0

    .line 1257
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreateDialog(I)Landroid/app/Dialog;

    move-result-object v1

    :goto_0
    return-object v1

    .line 1150
    :pswitch_0
    :try_start_0
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    if-eqz v1, :cond_0

    .line 1151
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    const/4 v2, 0x0

    invoke-interface {v1, v2}, Lcom/htc/android/footprints/ILocationAgentService;->setTimeoutNotify(Z)V
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    .line 1156
    :cond_0
    :goto_1
    new-instance v1, Lcom/htc/widget/HtcAlertDialog$Builder;

    invoke-direct {v1, p0}, Lcom/htc/widget/HtcAlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v2, 0x7f0a0044

    invoke-virtual {v1, v2}, Lcom/htc/widget/HtcAlertDialog$Builder;->setTitle(I)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v1

    invoke-virtual {v1, v3}, Lcom/htc/widget/HtcAlertDialog$Builder;->setIcon(I)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v1

    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f070002

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;

    move-result-object v2

    new-instance v3, Lcom/htc/android/footprints/activity/PostcardActivity$8;

    invoke-direct {v3, p0}, Lcom/htc/android/footprints/activity/PostcardActivity$8;-><init>(Lcom/htc/android/footprints/activity/PostcardActivity;)V

    invoke-virtual {v1, v2, v3}, Lcom/htc/widget/HtcAlertDialog$Builder;->setItems([Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v1

    invoke-virtual {v1}, Lcom/htc/widget/HtcAlertDialog$Builder;->create()Lcom/htc/widget/HtcAlertDialog;

    move-result-object v1

    iput-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mListDialog:Lcom/htc/widget/HtcAlertDialog;

    .line 1200
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mListDialog:Lcom/htc/widget/HtcAlertDialog;

    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->dlgKeyListener:Landroid/content/DialogInterface$OnKeyListener;

    invoke-virtual {v1, v2}, Lcom/htc/widget/HtcAlertDialog;->setOnKeyListener(Landroid/content/DialogInterface$OnKeyListener;)V

    .line 1217
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mListDialog:Lcom/htc/widget/HtcAlertDialog;

    goto :goto_0

    .line 1153
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 1154
    .local v0, e1:Landroid/os/RemoteException;
    invoke-virtual {v0}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_1

    .line 1220
    .end local v0           #e1:Landroid/os/RemoteException;
    :pswitch_1
    new-instance v1, Lcom/htc/widget/HtcAlertDialog$Builder;

    invoke-direct {v1, p0}, Lcom/htc/widget/HtcAlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v2, 0x7f0a0014

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/activity/PostcardActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/htc/widget/HtcAlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v1

    const v2, 0x1080027

    invoke-virtual {v1, v2}, Lcom/htc/widget/HtcAlertDialog$Builder;->setIcon(I)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v1

    const v2, 0x7f0a0095

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/activity/PostcardActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/htc/widget/HtcAlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v1

    const v2, 0x7f0a009d

    new-instance v3, Lcom/htc/android/footprints/activity/PostcardActivity$9;

    invoke-direct {v3, p0}, Lcom/htc/android/footprints/activity/PostcardActivity$9;-><init>(Lcom/htc/android/footprints/activity/PostcardActivity;)V

    invoke-virtual {v1, v2, v3}, Lcom/htc/widget/HtcAlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v1

    const v2, 0x7f0a0004

    invoke-virtual {v1, v2, v5}, Lcom/htc/widget/HtcAlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v1

    invoke-virtual {v1}, Lcom/htc/widget/HtcAlertDialog$Builder;->create()Lcom/htc/widget/HtcAlertDialog;

    move-result-object v1

    goto :goto_0

    .line 1238
    :pswitch_2
    new-instance v1, Lcom/htc/widget/HtcAlertDialog$Builder;

    invoke-direct {v1, p0}, Lcom/htc/widget/HtcAlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v2, 0x7f0a009a

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/activity/PostcardActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/htc/widget/HtcAlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v1

    invoke-virtual {v1, v3}, Lcom/htc/widget/HtcAlertDialog$Builder;->setIcon(I)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v1

    const v2, 0x7f0a009c

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/activity/PostcardActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/htc/widget/HtcAlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v1

    const v2, 0x7f0a0065

    invoke-virtual {v1, v2, v5}, Lcom/htc/widget/HtcAlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v1

    invoke-virtual {v1}, Lcom/htc/widget/HtcAlertDialog$Builder;->create()Lcom/htc/widget/HtcAlertDialog;

    move-result-object v1

    goto/16 :goto_0

    .line 1246
    :pswitch_3
    new-instance v1, Landroid/app/ProgressDialog;

    invoke-direct {v1, p0}, Landroid/app/ProgressDialog;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->progressDialog:Landroid/app/ProgressDialog;

    .line 1247
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->progressDialog:Landroid/app/ProgressDialog;

    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f0a00ac

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/app/ProgressDialog;->setMessage(Ljava/lang/CharSequence;)V

    .line 1248
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->progressDialog:Landroid/app/ProgressDialog;

    invoke-virtual {v1, v4}, Landroid/app/ProgressDialog;->setIndeterminate(Z)V

    .line 1249
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->progressDialog:Landroid/app/ProgressDialog;

    invoke-virtual {v1, v4}, Landroid/app/ProgressDialog;->setCancelable(Z)V

    .line 1250
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->progressDialog:Landroid/app/ProgressDialog;

    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->dlgKeyListener:Landroid/content/DialogInterface$OnKeyListener;

    invoke-virtual {v1, v2}, Landroid/app/ProgressDialog;->setOnKeyListener(Landroid/content/DialogInterface$OnKeyListener;)V

    .line 1251
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->progressDialog:Landroid/app/ProgressDialog;

    goto/16 :goto_0

    .line 1254
    :pswitch_4
    new-instance v1, Lcom/htc/android/footprints/commonui/HtcDialog;

    invoke-direct {v1, p0}, Lcom/htc/android/footprints/commonui/HtcDialog;-><init>(Landroid/content/Context;)V

    invoke-virtual {v1}, Lcom/htc/android/footprints/commonui/HtcDialog;->getLocationPickerNotFoundDialog()Lcom/htc/widget/HtcAlertDialog;

    move-result-object v1

    goto/16 :goto_0

    .line 1146
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
    .end packed-switch
.end method

.method public onCreateOptionsMenu(Landroid/view/Menu;)Z
    .locals 7
    .parameter "menu"

    .prologue
    const/4 v6, 0x4

    const/4 v3, 0x3

    const/4 v2, 0x2

    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 626
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f0a0043

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-interface {p1, v4, v3, v3, v0}, Landroid/view/Menu;->add(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v0

    const v1, 0x7f0200b4

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 629
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f0a0047

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-interface {p1, v4, v2, v2, v0}, Landroid/view/Menu;->add(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v0

    const v1, 0x7f0200b2

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 632
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f0a003f

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-interface {p1, v4, v5, v5, v0}, Landroid/view/Menu;->add(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v0

    const v1, 0x7f0200b1

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 635
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f0a0048

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-interface {p1, v4, v4, v4, v0}, Landroid/view/Menu;->add(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v0

    const v1, 0x7f0200b5

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 638
    const/4 v0, 0x5

    const/4 v1, 0x5

    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f0a000f

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-interface {p1, v4, v0, v1, v2}, Landroid/view/Menu;->add(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v0

    const v1, 0x7f0200af

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 641
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f0a0010

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-interface {p1, v4, v6, v6, v0}, Landroid/view/Menu;->add(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v0

    const v1, 0x7f0200ae

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 645
    iput-object p1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mMenu:Landroid/view/Menu;

    .line 647
    return v5
.end method

.method protected onDestroy()V
    .locals 2

    .prologue
    .line 386
    const-string v0, "PostcardActivity"

    const-string v1, "onDestroy"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 389
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->removeQueuedMessages()V

    .line 392
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/htc/android/footprints/activity/PostcardActivity;->unbindLocationAgentService(Z)V

    .line 394
    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    .line 395
    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 5
    .parameter "keyCode"
    .parameter "event"

    .prologue
    const/4 v4, 0x1

    .line 399
    const/4 v0, 0x4

    if-ne p1, v0, :cond_0

    .line 402
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->updateToFootprint()V

    .line 403
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    invoke-static {v0}, Lcom/htc/android/footprints/utils/FootprintUtils;->setLocationToPicture(Lcom/htc/android/footprints/vo/Footprint;)V

    .line 404
    invoke-virtual {p0, p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->saveFootprint(Landroid/content/Context;)Z

    .line 405
    iput-boolean v4, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isRecaptureRunning:Z

    .line 407
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    const/16 v1, 0x39

    const-wide/16 v2, 0x32

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    move v0, v4

    .line 427
    :goto_0
    return v0

    .line 419
    :cond_0
    const/16 v0, 0x13

    if-eq p1, v0, :cond_1

    const/16 v0, 0x14

    if-eq p1, v0, :cond_1

    const/16 v0, 0x15

    if-eq p1, v0, :cond_1

    const/16 v0, 0x16

    if-ne p1, v0, :cond_2

    .line 421
    :cond_1
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonDone:Landroid/view/View;

    invoke-virtual {v0}, Landroid/view/View;->isFocusable()Z

    move-result v0

    if-nez v0, :cond_2

    .line 422
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonDone:Landroid/view/View;

    invoke-virtual {v0, v4}, Landroid/view/View;->setFocusable(Z)V

    .line 423
    iget-object v0, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonPlay:Lcom/htc/android/footprints/view/PlayButton;

    invoke-virtual {v0, v4}, Lcom/htc/android/footprints/view/PlayButton;->setFocusable(Z)V

    .line 427
    :cond_2
    invoke-super {p0, p1, p2}, Landroid/app/Activity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    goto :goto_0
.end method

.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z
    .locals 11
    .parameter "item"

    .prologue
    .line 666
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getWindow()Landroid/view/Window;

    move-result-object v8

    const/16 v9, 0x80

    invoke-virtual {v8, v9}, Landroid/view/Window;->clearFlags(I)V

    .line 668
    invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I

    move-result v6

    .line 669
    .local v6, id:I
    const/4 v8, 0x3

    if-ne v6, v8, :cond_1

    .line 670
    const/4 v8, 0x1

    iput-boolean v8, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isRecaptureRunning:Z

    .line 671
    new-instance v3, Landroid/content/Intent;

    const-class v8, Lcom/htc/android/footprints/activity/FootprintCamera;

    invoke-direct {v3, p0, v8}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 673
    .local v3, footprintcamera:Landroid/content/Intent;
    const-string v8, "recapture"

    const/4 v9, 0x2

    invoke-virtual {v3, v8, v9}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 675
    const-string v8, "LAUNCH_BY_WIDGET"

    iget-boolean v9, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isLanuchByWidget:Z

    invoke-virtual {v3, v8, v9}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 678
    const-string v8, "PostcardActivity"

    new-instance v9, Ljava/lang/StringBuilder;

    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

    const-string v10, "MENU_RE_CAPTURE, isLanuchByWidget = "

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    iget-boolean v10, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isLanuchByWidget:Z

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v9

    invoke-static {v8, v9}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 680
    const/16 v8, 0x15b3

    invoke-virtual {p0, v3, v8}, Lcom/htc/android/footprints/activity/PostcardActivity;->startActivityForResult(Landroid/content/Intent;I)V

    .line 831
    .end local v3           #footprintcamera:Landroid/content/Intent;
    :cond_0
    :goto_0
    const/4 v8, 0x1

    return v8

    .line 681
    :cond_1
    const/4 v8, 0x2

    if-ne v6, v8, :cond_3

    .line 682
    iget-boolean v8, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->gpsEnabled:Z

    if-eqz v8, :cond_2

    .line 683
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getWindow()Landroid/view/Window;

    move-result-object v8

    const/16 v9, 0x80

    invoke-virtual {v8, v9}, Landroid/view/Window;->addFlags(I)V

    .line 686
    :try_start_0
    iget-object v8, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    invoke-interface {v8}, Lcom/htc/android/footprints/ILocationAgentService;->enableMyLocation()V

    .line 687
    const v8, 0x7f0c0059

    invoke-virtual {p0, v8}, Lcom/htc/android/footprints/activity/PostcardActivity;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/TextView;

    .line 688
    .local v4, gps_text:Landroid/widget/TextView;
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v8

    const v9, 0x7f0a0011

    invoke-virtual {v8, v9}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v4, v8}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    .line 693
    .end local v4           #gps_text:Landroid/widget/TextView;
    :goto_1
    const/4 v8, 0x0

    invoke-interface {p1, v8}, Landroid/view/MenuItem;->setEnabled(Z)Landroid/view/MenuItem;

    goto :goto_0

    .line 690
    :catch_0
    move-exception v8

    move-object v1, v8

    .line 691
    .local v1, e:Landroid/os/RemoteException;
    invoke-virtual {v1}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_1

    .line 695
    .end local v1           #e:Landroid/os/RemoteException;
    :cond_2
    const/4 v8, 0x1

    invoke-virtual {p0, v8}, Lcom/htc/android/footprints/activity/PostcardActivity;->showDialog(I)V

    goto :goto_0

    .line 697
    :cond_3
    const/4 v8, 0x1

    if-ne v6, v8, :cond_7

    .line 699
    :try_start_1
    iget-boolean v8, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->gpsEnabled:Z

    if-eqz v8, :cond_4

    .line 700
    iget-object v8, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    const/4 v9, 0x0

    invoke-interface {v8, v9}, Lcom/htc/android/footprints/ILocationAgentService;->setTimeoutNotify(Z)V
    :try_end_1
    .catch Landroid/os/RemoteException; {:try_start_1 .. :try_end_1} :catch_2

    .line 706
    :cond_4
    :goto_2
    new-instance v7, Landroid/content/Intent;

    const-string v8, "com.htc.android.locationpicker"

    invoke-direct {v7, v8}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 707
    .local v7, intent:Landroid/content/Intent;
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v8

    const v9, 0x7f020097

    invoke-virtual {v8, v9}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v5

    check-cast v5, Landroid/graphics/drawable/BitmapDrawable;

    .line 709
    .local v5, icon:Landroid/graphics/drawable/BitmapDrawable;
    invoke-virtual {v5}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v0

    .line 710
    .local v0, bitmap:Landroid/graphics/Bitmap;
    const-string v8, "PickerIcon"

    invoke-virtual {v7, v8, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    .line 711
    const-string v8, "InputLocation"

    const/4 v9, 0x3

    invoke-virtual {v7, v8, v9}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 713
    const-string v8, "PickerMode"

    const/4 v9, 0x1

    invoke-virtual {v7, v8, v9}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 714
    const-string v8, "PickerPanelStyle"

    const/16 v9, 0x8

    invoke-virtual {v7, v8, v9}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 716
    const-string v8, "PickerReturnType"

    const/16 v9, 0x9

    invoke-virtual {v7, v8, v9}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 719
    iget-object v8, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    if-nez v8, :cond_6

    .line 720
    iget-object v8, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixNetwork:Landroid/location/Location;

    if-eqz v8, :cond_5

    .line 721
    const-string v8, "PickerLatitude"

    iget-object v9, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixNetwork:Landroid/location/Location;

    invoke-virtual {v9}, Landroid/location/Location;->getLatitude()D

    move-result-wide v9

    invoke-virtual {v7, v8, v9, v10}, Landroid/content/Intent;->putExtra(Ljava/lang/String;D)Landroid/content/Intent;

    .line 723
    const-string v8, "PickerLongitude"

    iget-object v9, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixNetwork:Landroid/location/Location;

    invoke-virtual {v9}, Landroid/location/Location;->getLongitude()D

    move-result-wide v9

    invoke-virtual {v7, v8, v9, v10}, Landroid/content/Intent;->putExtra(Ljava/lang/String;D)Landroid/content/Intent;

    .line 733
    :goto_3
    const-string v8, "PickerAlertConnectionFailed"

    invoke-static {p0}, Lcom/htc/android/footprints/utils/SettingInfo;->getInstance(Landroid/content/Context;)Lcom/htc/android/footprints/utils/SettingInfo;

    move-result-object v9

    iget-boolean v9, v9, Lcom/htc/android/footprints/utils/SettingInfo;->showConnectionFailedAlert:Z

    invoke-virtual {v7, v8, v9}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 736
    const/4 v8, 0x1

    :try_start_2
    iput-boolean v8, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isPickerRunning:Z

    .line 737
    const/4 v8, 0x1

    invoke-virtual {p0, v7, v8}, Lcom/htc/android/footprints/activity/PostcardActivity;->startActivityForResult(Landroid/content/Intent;I)V
    :try_end_2
    .catch Landroid/content/ActivityNotFoundException; {:try_start_2 .. :try_end_2} :catch_1

    goto/16 :goto_0

    .line 738
    :catch_1
    move-exception v8

    move-object v2, v8

    .line 739
    .local v2, ex:Landroid/content/ActivityNotFoundException;
    const/4 v8, 0x4

    invoke-virtual {p0, v8}, Lcom/htc/android/footprints/activity/PostcardActivity;->showDialog(I)V

    goto/16 :goto_0

    .line 702
    .end local v0           #bitmap:Landroid/graphics/Bitmap;
    .end local v2           #ex:Landroid/content/ActivityNotFoundException;
    .end local v5           #icon:Landroid/graphics/drawable/BitmapDrawable;
    .end local v7           #intent:Landroid/content/Intent;
    :catch_2
    move-exception v8

    move-object v1, v8

    .line 703
    .restart local v1       #e:Landroid/os/RemoteException;
    invoke-virtual {v1}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_2

    .line 726
    .end local v1           #e:Landroid/os/RemoteException;
    .restart local v0       #bitmap:Landroid/graphics/Bitmap;
    .restart local v5       #icon:Landroid/graphics/drawable/BitmapDrawable;
    .restart local v7       #intent:Landroid/content/Intent;
    :cond_5
    const-string v8, "InputLocation"

    const/4 v9, 0x4

    invoke-virtual {v7, v8, v9}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    goto :goto_3

    .line 730
    :cond_6
    const-string v8, "PickerLatitude"

    iget-object v9, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    invoke-virtual {v9}, Landroid/location/Location;->getLatitude()D

    move-result-wide v9

    invoke-virtual {v7, v8, v9, v10}, Landroid/content/Intent;->putExtra(Ljava/lang/String;D)Landroid/content/Intent;

    .line 731
    const-string v8, "PickerLongitude"

    iget-object v9, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFixLocation:Landroid/location/Location;

    invoke-virtual {v9}, Landroid/location/Location;->getLongitude()D

    move-result-wide v9

    invoke-virtual {v7, v8, v9, v10}, Landroid/content/Intent;->putExtra(Ljava/lang/String;D)Landroid/content/Intent;

    goto :goto_3

    .line 741
    .end local v0           #bitmap:Landroid/graphics/Bitmap;
    .end local v5           #icon:Landroid/graphics/drawable/BitmapDrawable;
    .end local v7           #intent:Landroid/content/Intent;
    :cond_7
    if-nez v6, :cond_8

    .line 742
    new-instance v8, Lcom/htc/android/footprints/commonui/AudioRecordDialog;

    iget-object v9, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    invoke-direct {v8, p0, v9}, Lcom/htc/android/footprints/commonui/AudioRecordDialog;-><init>(Landroid/content/Context;Lcom/htc/android/footprints/vo/Footprint;)V

    iput-object v8, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->recordDialog:Lcom/htc/android/footprints/commonui/AudioRecordDialog;

    .line 743
    iget-object v8, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->recordDialog:Lcom/htc/android/footprints/commonui/AudioRecordDialog;

    new-instance v9, Lcom/htc/android/footprints/activity/PostcardActivity$3;

    invoke-direct {v9, p0}, Lcom/htc/android/footprints/activity/PostcardActivity$3;-><init>(Lcom/htc/android/footprints/activity/PostcardActivity;)V

    invoke-virtual {v8, v9}, Lcom/htc/android/footprints/commonui/AudioRecordDialog;->setRecordStatusListener(Lcom/htc/android/footprints/commonui/AudioRecordDialog$recordStateListener;)V

    .line 761
    iget-object v8, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->recordDialog:Lcom/htc/android/footprints/commonui/AudioRecordDialog;

    invoke-virtual {v8}, Lcom/htc/android/footprints/commonui/AudioRecordDialog;->show()V

    goto/16 :goto_0

    .line 763
    :cond_8
    const/4 v8, 0x5

    if-ne v6, v8, :cond_9

    .line 764
    new-instance v7, Landroid/content/Intent;

    const-string v8, "com.htc.android.footprints.activity.FootprintDetailEditActivity"

    invoke-direct {v7, v8}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 768
    .restart local v7       #intent:Landroid/content/Intent;
    :try_start_3
    invoke-virtual {p0, p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->saveFootprint(Landroid/content/Context;)Z

    .line 770
    const-string v8, "DATA"

    iget-object v9, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    invoke-virtual {v7, v8, v9}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    .line 771
    const/16 v8, 0x12

    invoke-virtual {p0, v7, v8}, Lcom/htc/android/footprints/activity/PostcardActivity;->startActivityForResult(Landroid/content/Intent;I)V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_3

    goto/16 :goto_0

    .line 773
    :catch_3
    move-exception v8

    move-object v2, v8

    .line 774
    .local v2, ex:Ljava/lang/Exception;
    const-string v8, "PostcardActivity"

    invoke-virtual {v2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v9

    invoke-static {v8, v9, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto/16 :goto_0

    .line 777
    .end local v2           #ex:Ljava/lang/Exception;
    .end local v7           #intent:Landroid/content/Intent;
    :cond_9
    const/4 v8, 0x4

    if-ne v6, v8, :cond_0

    .line 778
    new-instance v8, Lcom/htc/widget/HtcAlertDialog$Builder;

    invoke-direct {v8, p0}, Lcom/htc/widget/HtcAlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v9, 0x7f0a00a5

    invoke-virtual {p0, v9}, Lcom/htc/android/footprints/activity/PostcardActivity;->getString(I)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/htc/widget/HtcAlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v8

    const v9, 0x1080027

    invoke-virtual {v8, v9}, Lcom/htc/widget/HtcAlertDialog$Builder;->setIcon(I)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v8

    const v9, 0x7f0a0017

    invoke-virtual {p0, v9}, Lcom/htc/android/footprints/activity/PostcardActivity;->getString(I)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/htc/widget/HtcAlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v8

    const v9, 0x7f0a0065

    invoke-virtual {p0, v9}, Lcom/htc/android/footprints/activity/PostcardActivity;->getString(I)Ljava/lang/String;

    move-result-object v9

    new-instance v10, Lcom/htc/android/footprints/activity/PostcardActivity$5;

    invoke-direct {v10, p0}, Lcom/htc/android/footprints/activity/PostcardActivity$5;-><init>(Lcom/htc/android/footprints/activity/PostcardActivity;)V

    invoke-virtual {v8, v9, v10}, Lcom/htc/widget/HtcAlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v8

    const v9, 0x7f0a0004

    invoke-virtual {p0, v9}, Lcom/htc/android/footprints/activity/PostcardActivity;->getString(I)Ljava/lang/String;

    move-result-object v9

    new-instance v10, Lcom/htc/android/footprints/activity/PostcardActivity$4;

    invoke-direct {v10, p0}, Lcom/htc/android/footprints/activity/PostcardActivity$4;-><init>(Lcom/htc/android/footprints/activity/PostcardActivity;)V

    invoke-virtual {v8, v9, v10}, Lcom/htc/widget/HtcAlertDialog$Builder;->setNegativeButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v8

    invoke-virtual {v8}, Lcom/htc/widget/HtcAlertDialog$Builder;->show()Lcom/htc/widget/HtcAlertDialog;

    goto/16 :goto_0
.end method

.method protected onPause()V
    .locals 4

    .prologue
    .line 345
    const-string v2, "PostcardActivity"

    const-string v3, "onPause"

    invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 347
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->recordDialog:Lcom/htc/android/footprints/commonui/AudioRecordDialog;

    if-eqz v2, :cond_0

    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->recordDialog:Lcom/htc/android/footprints/commonui/AudioRecordDialog;

    invoke-virtual {v2}, Lcom/htc/android/footprints/commonui/AudioRecordDialog;->isShowing()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 348
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->recordDialog:Lcom/htc/android/footprints/commonui/AudioRecordDialog;

    invoke-virtual {v2}, Lcom/htc/android/footprints/commonui/AudioRecordDialog;->terminateRecording()V

    .line 349
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->recordDialog:Lcom/htc/android/footprints/commonui/AudioRecordDialog;

    invoke-virtual {v2}, Lcom/htc/android/footprints/commonui/AudioRecordDialog;->dismiss()V

    .line 352
    :cond_0
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/os/Handler;->removeMessages(I)V

    .line 353
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->buttonPlay:Lcom/htc/android/footprints/view/PlayButton;

    invoke-virtual {v2}, Lcom/htc/android/footprints/view/PlayButton;->stopPlayback()V

    .line 355
    const v2, 0x7f0c004b

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/activity/PostcardActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ViewSwitcher;

    .line 356
    .local v1, switcher:Landroid/widget/ViewSwitcher;
    const/16 v2, 0x8

    invoke-virtual {v1, v2}, Landroid/widget/ViewSwitcher;->setVisibility(I)V

    .line 357
    invoke-virtual {v1}, Landroid/widget/ViewSwitcher;->showPrevious()V

    .line 358
    const/4 v2, 0x1

    iput-boolean v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->needAnimation:Z

    .line 360
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    if-eqz v2, :cond_1

    iget-boolean v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isPickerRunning:Z

    if-nez v2, :cond_1

    iget-boolean v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->isRecaptureRunning:Z

    if-nez v2, :cond_1

    .line 362
    :try_start_0
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    invoke-interface {v2}, Lcom/htc/android/footprints/ILocationAgentService;->waitForPause()V
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    .line 369
    :cond_1
    :goto_0
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

    if-eqz v2, :cond_2

    .line 370
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

    invoke-virtual {v2}, Lcom/htc/android/footprints/utils/StorageUtil;->closeStorgaeUtil()V

    .line 373
    :cond_2
    invoke-static {p0}, Lcom/htc/android/footprints/utils/TitleGenerator;->getInstance(Landroid/content/Context;)Lcom/htc/android/footprints/utils/TitleGenerator;

    move-result-object v2

    invoke-virtual {v2}, Lcom/htc/android/footprints/utils/TitleGenerator;->stopTitleSearch()V

    .line 375
    invoke-super {p0}, Landroid/app/Activity;->onPause()V

    .line 376
    return-void

    .line 363
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 365
    .local v0, e:Landroid/os/RemoteException;
    invoke-virtual {v0}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_0
.end method

.method public onPrepareOptionsMenu(Landroid/view/Menu;)Z
    .locals 4
    .parameter "menu"

    .prologue
    const/4 v3, 0x1

    .line 652
    const/4 v0, 0x1

    .line 653
    .local v0, b:Z
    iget-boolean v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->gpsEnabled:Z

    if-eqz v2, :cond_0

    .line 655
    :try_start_0
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    invoke-interface {v2}, Lcom/htc/android/footprints/ILocationAgentService;->isTracking()Z
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    move-result v2

    if-nez v2, :cond_1

    move v0, v3

    .line 660
    :cond_0
    :goto_0
    const/4 v2, 0x2

    invoke-interface {p1, v2}, Landroid/view/Menu;->findItem(I)Landroid/view/MenuItem;

    move-result-object v2

    invoke-interface {v2, v0}, Landroid/view/MenuItem;->setEnabled(Z)Landroid/view/MenuItem;

    .line 661
    return v3

    .line 655
    :cond_1
    const/4 v2, 0x0

    move v0, v2

    goto :goto_0

    .line 656
    :catch_0
    move-exception v2

    move-object v1, v2

    .line 657
    .local v1, e:Landroid/os/RemoteException;
    invoke-virtual {v1}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_0
.end method

.method protected onRestoreInstanceState(Landroid/os/Bundle;)V
    .locals 3
    .parameter "savedInstanceState"

    .prologue
    .line 293
    const-string v1, "PostcardActivity"

    const-string v2, "onRestoreInstanceState"

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 296
    const-string v1, "DATA"

    invoke-virtual {p1, v1}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v1

    check-cast v1, Lcom/htc/android/footprints/vo/Footprint;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    .line 297
    const-string v0, "android:savedDialogs"

    .line 298
    .local v0, SAVED_DIALOGS_TAG:Ljava/lang/String;
    invoke-virtual {p1, v0}, Landroid/os/Bundle;->remove(Ljava/lang/String;)V

    .line 299
    return-void
.end method

.method protected onResume()V
    .locals 6

    .prologue
    const-string v3, "PostcardActivity"

    .line 309
    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    .line 310
    const-string v2, "PostcardActivity"

    const-string v2, "onResume"

    invoke-static {v3, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 312
    iget-boolean v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->needAnimation:Z

    if-eqz v2, :cond_0

    .line 313
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->showAnimation()V

    .line 317
    :cond_0
    const-string v2, "location"

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/activity/PostcardActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/location/LocationManager;

    .line 318
    .local v1, service:Landroid/location/LocationManager;
    const-string v2, "gps"

    invoke-virtual {v1, v2}, Landroid/location/LocationManager;->isProviderEnabled(Ljava/lang/String;)Z

    move-result v2

    iput-boolean v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->gpsEnabled:Z

    .line 319
    iget-boolean v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->gpsEnabled:Z

    if-nez v2, :cond_1

    .line 320
    const/4 v2, 0x0

    iput-boolean v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->refreshRequired:Z

    .line 322
    :cond_1
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    if-eqz v2, :cond_4

    .line 324
    :try_start_0
    const-string v2, "PostcardActivity"

    const-string v3, "mService.resume() at onResume"

    invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 325
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    invoke-interface {v2}, Lcom/htc/android/footprints/ILocationAgentService;->resume()V

    .line 327
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    invoke-interface {v2}, Lcom/htc/android/footprints/ILocationAgentService;->isTimeout()Z

    move-result v2

    if-eqz v2, :cond_2

    .line 328
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mHandler:Landroid/os/Handler;

    const/16 v3, 0x32

    const-wide/16 v4, 0x64

    invoke-virtual {v2, v3, v4, v5}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    .line 338
    :cond_2
    :goto_0
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

    if-eqz v2, :cond_3

    .line 339
    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

    invoke-virtual {v2}, Lcom/htc/android/footprints/utils/StorageUtil;->startStorageUtil()V

    .line 341
    :cond_3
    return-void

    .line 330
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 331
    .local v0, e:Landroid/os/RemoteException;
    invoke-virtual {v0}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_0

    .line 333
    .end local v0           #e:Landroid/os/RemoteException;
    :cond_4
    iget v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mBindState:I

    if-nez v2, :cond_2

    iget-boolean v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->gpsEnabled:Z

    if-eqz v2, :cond_2

    .line 335
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->bindLocationAgentService()V

    goto :goto_0
.end method

.method protected onSaveInstanceState(Landroid/os/Bundle;)V
    .locals 2
    .parameter "outState"

    .prologue
    .line 286
    const-string v0, "PostcardActivity"

    const-string v1, "onSaveInstanceState"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 287
    const-string v0, "DATA"

    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V

    .line 289
    return-void
.end method

.method protected onStart()V
    .locals 0

    .prologue
    .line 303
    invoke-super {p0}, Landroid/app/Activity;->onStart()V

    .line 305
    return-void
.end method

.method protected onStop()V
    .locals 2

    .prologue
    .line 380
    const-string v0, "PostcardActivity"

    const-string v1, "onStop"

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 381
    invoke-super {p0}, Landroid/app/Activity;->onStop()V

    .line 382
    return-void
.end method

.method public saveFootprint(Landroid/content/Context;)Z
    .locals 3
    .parameter "context"

    .prologue
    .line 891
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    if-eqz v1, :cond_1

    .line 892
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/PostcardActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    invoke-static {v1}, Lcom/htc/android/footprints/provider/FootprintManager;->getInstance(Landroid/content/Context;)Lcom/htc/android/footprints/provider/FootprintManager;

    move-result-object v1

    iget-object v2, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    invoke-virtual {v1, v2}, Lcom/htc/android/footprints/provider/FootprintManager;->addFootprint(Lcom/htc/android/footprints/vo/Footprint;)I

    move-result v0

    .line 894
    .local v0, id:I
    if-ltz v0, :cond_0

    .line 895
    iget-object v1, p0, Lcom/htc/android/footprints/activity/PostcardActivity;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    invoke-virtual {v1, v0}, Lcom/htc/android/footprints/vo/Footprint;->setID(I)V

    .line 898
    :cond_0
    const/4 v1, 0x1

    .line 900
    .end local v0           #id:I
    :goto_0
    return v1

    :cond_1
    const/4 v1, 0x0

    goto :goto_0
.end method
